{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=266
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	a,b,c,d:int64;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(a,b,c,d);
if (a div abs(a)=c div abs(c)) and (b div abs(b)=d div abs(d)) then write('YES') else write('NO');
end.